package MouseInheritage;

public class MouseHandOriented  extends Mouse{
    private boolean HandOrientation; //true - right handed; false - left handed

    // Default class constructor
    MouseHandOriented() {
        this.HandOrientation = true;

        SetColor("White");
        SetScreenResolution(800, 600);
        SetMousePosition(400, 300);
    }

    // Constructor with a description of one class property
    MouseHandOriented(boolean HandOrientation) {
        this.HandOrientation = HandOrientation;

        SetColor("White");
        SetScreenResolution(800, 600);
        SetMousePosition(400, 300);
    }

    // Constructor with a description of all properties
    MouseHandOriented(boolean HandOrientation, String mouseColor, int maxX, int maxY) {
        this.HandOrientation = HandOrientation;
        SetColor(mouseColor);
        SetScreenResolution(maxX, maxY);
        SetMousePosition(maxX / 2, maxY / 2);
    }

    //This method handles the event click on the left mouse button
    public void LeftButtonClick() {
       if (HandOrientation) {
           System.out.println("Left click!");
       } else {
           System.out.println("Right click!");
       }
    }

    //This method handles the event click on the right mouse button
    public void RightButtonClick() {
        if (HandOrientation) {
            System.out.println("Right click!");
        } else {
            System.out.println("Left click!");
        }
    }

}
